<!--弹出层-->
<!-- 弹层蒙层（黑色半透明） -->
<div class="mask" style="display:none;z-index:9998"></div>
<!-- 弹层蒙层（黑色半透明） -->


<div id="sendMsg" class="xsRegLayer" style="display:none; top:100px; left:400px;z-index:9999">
    <a class="closeBtn">
        <span class="xsIcon icon_close"></span>
    </a>
    <p class="logoBox">
        <span class="logoImg logoL"></span>
    </p>
    <p class="regWay">给<span id="person"></span>发私信</p>
    <div class="LayRegWrap">
        <div class="LayRegBox">
            <p class="logInput logName">
                <textarea id="msg" class="xsArea fwA01"></textarea>
            </p>            
        </div>
        <p class="LaylogBtn"><a class="logBtn" href="javascript:send_msg();">发送</a>
        </p>
    </div>
   
</div>

<!-- 提示弹层 -->
<div id="sendMsg2" class="xsWLayer warnLayer" style=" display:none; top:300px; left:300px;z-index:9999">
    <a class="closeBtn">
        <span class="xsIcon icon_close"></span>
    </a>

    <div class="WLayerMain">
        <p class="WLayerTit2">提示</p>
        <div class="layerCon">
            <p class="warnTxt">发送成功！</p>
        </div>
        <p class="layerBtn"><a class="btnA">确定</a>
        </p>

    </div>
</div>




<script type="text/javascript">
        $(function(){
        	$(".closeBtn").bind({
        		click: function(){
        			$(".xsRegLayer").hide();
        			$(".xsWLayer").hide();
        			$(".mask").hide();
        		}
        	});
        });
		

		function open_msg(person){
            $("#person").text(person);
			$(".mask").show();
			$("#sendMsg").show();
		}

		function send_msg(){
			var msg = $("#msg").val();
            
            var uid = $("#uid").val();
			$.post("__ROOT__/admin/personal/sendMsg",{'msg':msg,'uid':uid},function(data){
				 //alert(data.success);
				 if (data.success){
				 	$(".mask").hide();	
				 	$("#sendMsg").hide();	
				 	//$("#sendMsg2").show();
				 }//undo 
			})
		}
      
	</script>
